<?php
namespace app\common\model;
use think\model\concern\SoftDelete;

class WorkStation extends TyModel {

    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    //办公类型
    public function getWorkTypeNameAttr($value,$data){
        $status = [1 => '开放办公',2 => '独立办公'];
        return $status[$data['work_type']];
    }

    //是否有室内空调
    public function getIsIndoorAirNameAttr($value,$data){
        $status = [0 => '无',1 => '有'];
        return $status[$data['is_indoor_air']];
    }
}